<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
*{font-family:Tahoma, Arial, Helvetica, Sans-serif,"宋体";}
table{
	width:85%;
	margin:0px auto;
	font:Georgia 11px;
	font-size:12px;
	color:#333333;
	text-align:center;
	border-collapse:collapse;/*细线表格代码*/
}
table td{
	border:1px solid #999;/*细线表格线条颜色*/
	height:22px;
}
caption{text-align:center;font-size:12px;font-weight:bold;margin:0 auto;}
tr.t1 td {background-color:#fff;}
tr.t2 td {background-color:#eee;}
tr.t3 td {background-color:#ccc;}
th,tfoot tr td{font-weight:bold;text-align:center;background:#c5c5c5;}
th{line-height:30px;height:30px;}
tfoot tr td{background:#fff;line-height:26px;height:26px;}
thead{border:1px solid #999;}
thead tr td{text-align:center;}
#page{text-align:center;float:right;}
#page a,#page a:visited{width:60px;height:22px;line-height:22px;border:1px black solid;display:block;float:left;margin:0 3px;background:#c9c9c9;
text-decoration:none;}
#page a:hover{background:#c1c1c1;text-decoration:none;}
.grayr {padding:2px;font-size:11px;background:#fff;float:right;}
.grayr a {padding:2px 5px;margin:2px;color:#000;text-decoration:none;;border:1px #c0c0c0 solid;}
.grayr a:hover {color:#000;border:1px orange solid;}
.grayr a:active {color:#000;background: #99ffff}
.grayr span.current {padding:2px 5px;font-weight:bold; margin:2px; color: #303030;background:#fff;border:1px orange solid;}
.grayr span.disabled {padding:2px 5px;margin:2px;color:#797979;background: #c1c1c1;border:1px #c1c1c1 solid;}
a{
	text-decoration:none;
	}
	img{
		border:0px;}
-->
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/list.js" type="text/javascript"></script>
<script type="text/javascript">
var insertObj;
function selectPage(obj)
{

	var value = obj.value;
	document.location.href="control.php?action=zhyList&page="+value+"&countPage=#{$countPage}#&count=#{$count}#&xyId=#{$xy->getXy_id()}#";
	}
function openXS(trId,imgId,bjId)
{
	
		var obj = document.getElementById("tr"+trId);
		var imgobj = document.getElementById(imgId);
 		insertObj = document.getElementById("div"+trId);
         var srcStr = imgobj.src;
		if(srcStr.indexOf("images/symbol_addition.gif")>0)
	{
		///obj.style.display = 'table-row';
		
		
		JqueryShow($("#"+"tr"+trId));
		imgobj.src='images/symbol_subtraction.gif';
		}
		else
{
	//obj.style.display = 'none';
	Jqueryhidden($("#"+"tr"+trId));
	imgobj.src='images/symbol_addition.gif';
	}

	ajaxFunBJ("control.php?action=AjaxBJ&bjId="+bjId,insertBJList);
	}
var xmlHttp;
function setXmlHttpRequest()
{
if(window.ActiveXObject)
{
	xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
	}
	else if(window.XMLHttpRequest)
	{
		xmlHttp = new XMLHttpRequest();
		}
}

function ajaxFunBJ(url,funName)
{
	setXmlHttpRequest();
	url = encodeURI(url);
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange = funName;
	xmlHttp.send(null);
	}
function insertBJList()
{
	if(xmlHttp.readyState == 4)
	{
		if(xmlHttp.status == 200)
		{
	var content = xmlHttp.responseText;
	insertObj.innerHTML = content;
	}
	}
}
function checkStudentDetail(xsId)
{
	window.open('../readStudentDetail.php?xsId='+xsId,'学生信息' ,'height=500, width=900, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
	}
</script>
</head>

<body style="text-align:center;">
<center>

<fieldset style=" width:1110px;">
<legend><img src="images/311.gif"/>&nbsp;<span style="color:#333; font-size:15px; font-weight:bold;">专业列表</span></legend>
<table>
  <caption style="font-size:14px;">
所有属于《#{$xy->getXy_name()}#》专业列表|(<a href="../addZhuanYe.php?xyId=#{$xy->getXy_id()}#">+添加专业</a>)
  </caption>
  <thead>
    <tr>
      <th>专业名</th>
      <th>专业简介</th>
        <th>所属学院</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody id="tab">
  #{if $count==0}#
  <tr>
  <td colspan="4" align="center" style="text-align:center;">
  暂无数据！
  </td>
  </tr>
  #{else}#
  #{foreach from=$list item=zhy}#
    <tr onmousemove="changeBackColor(this)" onmouseout="removeBackColor(this)">
      <td style="cursor: pointer; text-align: left;" onclick="openChild('child#{$zhy->getZhy_id()}#','img#{$zhy->getZhy_id()}#')"><img id="img#{$zhy->getZhy_id()}#" src="images/symbol_addition.gif"  width="14" height="14"/> &nbsp;#{$zhy->getZhy_name()}#(#{$zhy->getBjCount()}#)</td>
      <td>#{$zhy->getZhy_describe()|truncate:30:"...."}#</td>
   <td>#{$zhy->getXy()->getXy_name()}#</td>
      <td><a href="../addBanJi.php?zhyId=#{$zhy->getZhy_id()}#" title="添加班级"><img src="images/table_(add)_16x16.gif" title="添加班级" width="14" height="14" />添加班级</a>  <a href="control.php?action=deleteZhY&zhyId=#{$zhy->getZhy_id()}#&xyId=#{$zhy->getXy()->getXy_id()}#" onclick="return confirm('确定要删除该专业吗？');"  title="删除该专业"><img src="images/table_(delete)_16x16.gif" title="删除该专业" width="14" height="14"/> 删除</a>&nbsp;&nbsp;&nbsp;<a href="../modifyZhuanYe.php?zhyId=#{$zhy->getZhy_id()}#" title="修改该专业信息"><img title="修改该专业信息" src="images/table_(edit)_16x16.gif" width="14" height="14"/> 修改</a></td>
    </tr>
    #{if $zhy->getBjCount()>0}#
    <tr id="child#{$zhy->getZhy_id()}#" style="display:none;" >
    <td colspan="4">
   <table border="0" width="100%">
    #{foreach from=$zhy->getBjList() item=bj}#
 <tr onmousemove="changeBackColor(this)" onmouseout="removeBackColor(this)">
<td style="text-align:left; list-style:none; border:0px; height:20px; line-height:20px; border:0px; width:30%;" >
     |--&nbsp;<img id="bj#{$bj->getBj_id()}#" src="images/symbol_addition.gif"  width="14" height="14"/><a href="#" title="展开查看学生"  onclick="openXS('#{$bj->getBj_id()}#','bj#{$bj->getBj_id()}#',#{$bj->getBj_id()}#)">#{$bj->getBj_name()}#(#{$bj->getXsCount()}#)</a>
</td>
<td style="text-align:left; list-style:none; border:0px; height:20px; line-height:20px; border:0px;" >
     [<a href="../modifyBanJi.php?bjId=#{$bj->getBj_id()}#" title="修改班级">修改班级</a>]&nbsp;[<a href="control.php?action=deleteBJ&bjId=#{$bj->getBj_id()}#" onclick="return confirm('确定要删除该班级吗？');" title="删除班级">删除该班级</a>]
</td>
</tr>
<tr id="tr#{$bj->getBj_id()}#" style="display:none;">
<td colspan="2" style="border:0px; text-align:left;">
<div id="div#{$bj->getBj_id()}#">
&nbsp;&nbsp;&nbsp;&nbsp;加载中......
</div>
</td>
</tr>
#{/foreach}#
</table>
    </td>
    </tr>
    #{else}#
    <tr id="child#{$zhy->getZhy_id()}#" style="display:none;">
    <td colspan="4">
    该专业未创建相应的班级[<a href="../addBanJi.php?zhyId=#{$zhy->getZhy_id()}#" title="添加班级">点击创建</a>]</td>
    </tr>
    #{/if}#
    #{/foreach}#
    #{/if}#
  <tr>
  <td colspan="4" align="right" style="text-align:right;">
  共有#{$count}#条记录 总共有#{$countPage}#页 当前为#{$start}#-#{$end}#条 在第#{$nowPage}#页
  #{if $nowPage==1}#
 上一页
  #{else}#
  <a href="control.php?action=zhyList&page=#{$nowPage-1}#&countPage=#{$countPage}#&count=#{$count}#&xyId=#{$xy->getXy_id()}#">上一页</a>
  #{/if}#

  #{if $countPage>$nowPage}#
   <a href="control.php?action=zhyList&page=#{$nowPage+1}#&countPage=#{$countPage}#&count=#{$count}#&xyId=#{$xy->getXy_id()}#"> 下一页</a>
  #{else}#
  下一页
  #{/if}#
  跳至<select onchange="selectPage(this)">
  #{section loop=$countPage name=a}#
<option value="#{$smarty.section.a.iteration}#" #{if $smarty.section.a.iteration==$nowPage}# selected="selected"#{/if}#>#{$smarty.section.a.iteration}#页</option>
#{/section}#
</select>
  &nbsp;&nbsp;
  
  </td>
  </tr>
  </tbody>


  
</table>
</fieldset>
</center>
</body>
</html>
